﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Shared.xaml"/>
    </ResourceDictionary.MergedDictionaries>
        <Style x:Key="WindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="{StaticResource Background}"/>
        <Setter Property="Foreground" Value="{StaticResource Foreground}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Window">
                    <Border SnapsToDevicePixels="True"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            x:Name="Border">
                        <Grid SnapsToDevicePixels="True">
                            <ContentPresenter />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="WindowStyle" Value="None">
                            <Setter Property="BorderThickness" Value="1" />
                            <Setter Property="BorderBrush" Value="{StaticResource BorderBrushSelected}" />
                            <Setter Property="AllowsTransparency" Value="True"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>